package service.impl;

import entity.MyFile;
import org.hibernate.criterion.DetachedCriteria;
import dao.FileDao;
import service.FileService;

import java.io.Serializable;
import java.util.List;

public class FileServiceImpl implements FileService {
    private FileDao fd;
    @Override
    public void save(MyFile file) {
        fd.save(file);
    }

    @Override
    public MyFile getFileById(Serializable id) {
        return fd.getById(id);
    }

    @Override
    public List<MyFile> getFileByCondition(DetachedCriteria dc) {
        return fd.getByCondition(dc);
    }

    public void setFd(FileDao fd) {
        this.fd = fd;
    }
}
